package com.kgcx.common.client.organization;

import com.kgcx.common.client.organization.pojo.Customer;
import com.kgcx.common.client.organization.pojo.CustomerMsg;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "organization")
public interface CustomerClient {

    @GetMapping("customer/getCustomer")
    Customer getCustomer(@RequestParam("kid") Long kid,
                         @RequestParam("phone") String phone,
                         @RequestParam("wxid") String wxid);

    @PostMapping("customer/sendCustomerMsg")
    void sendCustomerMsg(@RequestBody CustomerMsg customerMsg);
    
    @GetMapping("customer/queryCustomerList")
    List<Customer> queryCustomerList(
    		  @RequestParam("pageNum") Integer pageNum,
    		    @RequestParam("pageSize") Integer pageSize,
    		    @RequestParam("orderBy") String orderBy,
    		    @RequestParam("kid") Integer kid,
    		    @RequestParam("nameLike") String nameLike,
    		    @RequestParam("phoneLike") String phoneLike,
    		    @RequestParam("wxId") String wxId,
    		    @RequestParam("createTimeBegin") Long createTimeBegin,
    		    @RequestParam("createTimeEnd") Long createTimeEnd);
}
